﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SportsStore.Domain.Abstract;
using SportsStore.Domain.Entities;

namespace SportsStore.Domain.Concrete
{
    public class EFImageRepository:IImageRepository
    {
        private KeLianEntities context = new KeLianEntities();
        public IQueryable<Image> Images
        {
            get { return context.Images; }

        }

        public void AddImage(Image image)
        {
            context.Images.AddObject(image);
            context.SaveChanges();
        }

        public void DeleteImage(Image image)
        {
            context.Images.DeleteObject(image);
            context.SaveChanges();
        }
    }
}
